package com.qf.mybatis.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Book {
    private Integer id;

    private String name;

    private String author;

    private String publish;

    private Integer sort;


    /**
     * 转成csv字符串形式数据
     * @return 单条csv字符串
     */
    public String toCSVString(){
        return this.name+","+this.author+","+this.publish+","+this.sort;
    }

}